package com.cnn.util;

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Properties;

public class PropertiesUtil {


    static Properties properties = new Properties();
    private PropertiesUtil(){}
    public static Properties loadProperties(){
        try {
            Class clazz = PropertiesUtil.class;
            InputStreamReader fileReader =
                    new InputStreamReader(clazz.getResourceAsStream("/application.properties"));
            properties.load(fileReader);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return properties;
    }


    public static String getValue(String key){
        return (String) properties.get(key);
    }



}
